.class public Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;
.super Lcom/waiqin365/lightapp/base/WqBaseActivity;

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/widget/AdapterView$OnItemClickListener;


# instance fields
.field private a:Landroid/widget/TextView;

.field private b:Landroid/widget/TextView;

.field private c:Landroid/widget/ImageView;

.field private d:Lcom/waiqin365/lightapp/kehu/b/az;

.field private e:Landroid/widget/ListView;

.field private f:Lcom/waiqin365/base/db/cmfilteritem/a;

.field private g:Ljava/util/ArrayList;

.field private h:Ljava/util/ArrayList;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/base/WqBaseActivity;-><init>()V

    return-void
.end method

.method private a()V
    .locals 5

    const/4 v4, 0x1

    const/4 v1, 0x0

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->h:Ljava/util/ArrayList;

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v2, "cmFilterItem"

    invoke-virtual {v0, v2}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/cmfilteritem/a;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v2, "filteritems"

    invoke-virtual {v0, v2}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Ljava/util/ArrayList;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->g:Ljava/util/ArrayList;

    new-instance v2, Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-direct {v2}, Lcom/waiqin365/base/db/cmfilteritem/a;-><init>()V

    const-string/jumbo v0, "-1"

    invoke-virtual {v2, v0}, Lcom/waiqin365/base/db/cmfilteritem/a;->a(Ljava/lang/String;)V

    const v0, 0x7f0805b2

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Lcom/waiqin365/base/db/cmfilteritem/a;->b(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/cmfilteritem/a;->a()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    const-string/jumbo v0, ""

    iget-object v3, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {v3}, Lcom/waiqin365/base/db/cmfilteritem/a;->a()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string/jumbo v0, "-1"

    iget-object v3, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {v3}, Lcom/waiqin365/base/db/cmfilteritem/a;->a()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    :cond_0
    iput-boolean v4, v2, Lcom/waiqin365/base/db/cmfilteritem/a;->a:Z

    :cond_1
    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->h:Ljava/util/ArrayList;

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->h:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->g:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    new-instance v0, Lcom/waiqin365/lightapp/kehu/b/az;

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->h:Ljava/util/ArrayList;

    invoke-direct {v0, p0, v1}, Lcom/waiqin365/lightapp/kehu/b/az;-><init>(Landroid/content/Context;Ljava/util/List;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->d:Lcom/waiqin365/lightapp/kehu/b/az;

    return-void

    :cond_2
    iput-boolean v1, v2, Lcom/waiqin365/base/db/cmfilteritem/a;->a:Z

    :goto_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->g:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->g:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/cmfilteritem/a;->a()Ljava/lang/String;

    move-result-object v0

    iget-object v3, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {v3}, Lcom/waiqin365/base/db/cmfilteritem/a;->a()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->g:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/cmfilteritem/a;

    iput-boolean v4, v0, Lcom/waiqin365/base/db/cmfilteritem/a;->a:Z

    goto :goto_0

    :cond_3
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_1
.end method

.method private a(Landroid/content/Intent;)V
    .locals 3

    new-instance v0, Lcom/waiqin365/lightapp/view/a/a;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/view/a/a;-><init>()V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string/jumbo v2, "returnTo"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/waiqin365/lightapp/view/a/a;->a:Ljava/lang/String;

    iput-object p1, v0, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/util/Observable;->notifyObservers(Ljava/lang/Object;)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->finish()V

    const v0, 0x7f040020

    const v1, 0x7f040023

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->overridePendingTransition(II)V

    return-void
.end method

.method private b()V
    .locals 2

    const v0, 0x7f0c0305

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->a:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->a:Landroid/widget/TextView;

    const v1, 0x7f08072b

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const v0, 0x7f0c0309

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->b:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->b:Landroid/widget/TextView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    const v0, 0x7f0c01da

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->c:Landroid/widget/ImageView;

    const v0, 0x7f0c0133

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->e:Landroid/widget/ListView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->e:Landroid/widget/ListView;

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->d:Lcom/waiqin365/lightapp/kehu/b/az;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    return-void
.end method

.method private c()V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->c:Landroid/widget/ImageView;

    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->e:Landroid/widget/ListView;

    invoke-virtual {v0, p0}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    return-void
.end method

.method private d()V
    .locals 3

    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string/jumbo v1, "cmFilterItem"

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    const/4 v1, -0x1

    invoke-virtual {p0, v1, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->setResult(ILandroid/content/Intent;)V

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->a(Landroid/content/Intent;)V

    return-void
.end method


# virtual methods
.method public onBackPressed()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->d()V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->d()V

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x7f0c01da
        :pswitch_0
    .end packed-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-static {p0}, Lcom/fiberhome/gaea/client/d/a;->b(Landroid/app/Activity;)V

    const v0, 0x7f03005c

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->setContentView(I)V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->a()V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->b()V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->c()V

    return-void
.end method

.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 3

    const/4 v2, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->h:Ljava/util/ArrayList;

    invoke-virtual {v0, p3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/cmfilteritem/a;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    move v1, v2

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->h:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->h:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/cmfilteritem/a;

    iput-boolean v2, v0, Lcom/waiqin365/base/db/cmfilteritem/a;->a:Z

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lcom/waiqin365/base/db/cmfilteritem/a;->a:Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->h:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {v0, p3, v1}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->d:Lcom/waiqin365/lightapp/kehu/b/az;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/kehu/b/az;->notifyDataSetChanged()V

    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string/jumbo v1, "cmFilterItem"

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->f:Lcom/waiqin365/base/db/cmfilteritem/a;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    const/4 v1, -0x1

    invoke-virtual {p0, v1, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->setResult(ILandroid/content/Intent;)V

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/kehu/CMCustomerTypeSelectActivity;->a(Landroid/content/Intent;)V

    return-void
.end method
